package divinity.pathfinding
{
	import divinity.utils.Calculator;

	public class PathNode
	{
		private var _checked:Object;
		private var _distance:Number;
		private var _movable:Boolean;
		private var _cost:Number;
		private var _calculator:Calculator=new Calculator();
		public function PathNode(checkPoint,destPoint,world)
		{
			//trace("checking node ",destPoint.x);
			_checked=checkPoint;
			_movable=world.getMovable(checkPoint.x,checkPoint.y);
			
			var v=_calculator.point2point(checkPoint,destPoint);
			_distance=v.d;
		}
		/**
		 * 
		 * 
		 * 
		 * 
		 * 
		 * 
		 * 
		 * */
		public function get checked():Object
		{
			return _checked;
		}

		/*public function set checked(value:Boolean):void
		{
			_checked = value;
		}*/

		public function get distance():Number
		{
			return _distance;
		}

		public function set distance(value:Number):void
		{
			_distance = value;
		}

		public function get movable():Boolean
		{
			return _movable;
		}

		public function set movable(value:Boolean):void
		{
			_movable = value;
		}


	}
}